package values.shop
{
import core.Language;

/**
 * ShopGroupValue
 * @author jliang
 *
 */
public class ShopGroupValue
{
    [Data(type="field", mapping="@index")]
    public var index:int;
    
    [Data(type="field", mapping="@name")]
    public var baseNameKey:String;
    
    public function get name():String
    {
        return Language.getText(baseNameKey);
    }
    
    private var  _typeList:Array;   /* ShopGroupTypeValue */
    
    public function get typeList():Array 
    {
        return _typeList;
    }
        
    [Data(type="mapping", 
    		   mapping="type", 
    		   ref="values.shop.ShopGroupTypeValue",
    		   way="one_to_more")]
    public function set typeList(value:Array):void
    {
        _typeList = value;
        _typeList.sortOn("index", Array.NUMERIC);
    }
}
}



